package com.ruoyi.sxt.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.sxt.domain.SxtGangwei;
import com.ruoyi.sxt.mapper.SxtGangweiMapper;
import com.ruoyi.sxt.service.ISxtGangweiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;



import com.ruoyi.common.core.text.Convert;

/**
 * 岗位信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-27
 */
@Service
public class SxtGangweiServiceImpl implements ISxtGangweiService
{
    @Autowired
    private SxtGangweiMapper sxtGangweiMapper;

    /**
     * 查询岗位信息
     * 
     * @param postId 岗位信息主键
     * @return 岗位信息
     */
    @Override
    public SxtGangwei selectSxtGangweiByPostId(Long postId)
    {
        return sxtGangweiMapper.selectSxtGangweiByPostId(postId);
    }

    /**
     * 查询岗位信息列表
     * 
     * @param sxtGangwei 岗位信息
     * @return 岗位信息
     */
    @Override
    public List<SxtGangwei> selectSxtGangweiList(SxtGangwei sxtGangwei)
    {
        return sxtGangweiMapper.selectSxtGangweiList(sxtGangwei);
    }

    /**
     * 新增岗位信息
     * 
     * @param sxtGangwei 岗位信息
     * @return 结果
     */
    @Override
    public int insertSxtGangwei(SxtGangwei sxtGangwei)
    {
        sxtGangwei.setCreateTime(DateUtils.getNowDate());
        return sxtGangweiMapper.insertSxtGangwei(sxtGangwei);
    }

    /**
     * 修改岗位信息
     * 
     * @param sxtGangwei 岗位信息
     * @return 结果
     */
    @Override
    public int updateSxtGangwei(SxtGangwei sxtGangwei)
    {
        sxtGangwei.setUpdateTime(DateUtils.getNowDate());
        return sxtGangweiMapper.updateSxtGangwei(sxtGangwei);
    }

    /**
     * 批量删除岗位信息
     * 
     * @param postIds 需要删除的岗位信息主键
     * @return 结果
     */
    @Override
    public int deleteSxtGangweiByPostIds(String postIds)
    {
        return sxtGangweiMapper.deleteSxtGangweiByPostIds(Convert.toStrArray(postIds));
    }

    /**
     * 删除岗位信息信息
     * 
     * @param postId 岗位信息主键
     * @return 结果
     */
    @Override
    public int deleteSxtGangweiByPostId(Long postId)
    {
        return sxtGangweiMapper.deleteSxtGangweiByPostId(postId);
    }
}
